<include file="Public/header" />
<div class="page">
  <div class="fixed-bar">
    <div class="item-title">
      <h3>数据库备份</h3>
      <ul class="tab-base">
        <li><a href="JavaScript:void(0);" class="current"><span>管理</span></a></li>
        <li>
        <a href='javascript:if(confirm("确定要备份所有数据?"))window.location ="{:U('Database/backall')}";'><span>点击备份数据</span></a></li>
        <li><!--<a href="{:U('Database/tablist')}"><span>备份部分数据</span></a></li>-->
      </ul>
    </div>
  </div>
  <div class="fixed-empty"></div>
    <table class="table tb-type2" id="prompt">
    <tbody>
      <tr class="space odd">
        <th class="nobg" colspan="12"><div class="title"><h5>操作提示</h5><span class="arrow"></span></div></th>
      </tr>
      <tr>
        <td>
        <ul>
         <li>定期进行本地数据备份、可提高系统数据安全、可靠性！</li>
         <li>建议备份后将sql文件下载到本地保存，并删除服务器上的sql文件</li>
        </ul>
        </td>
      </tr>
    </tbody>
  </table>
  <table class="table tb-type2 nobdb">
    <thead>
      <tr class="thead">
        <th>备份文件名</th>
        <th class="align-center">备份时间</th>
        <th class="align-center">文件大小</th>
        <th class="align-center">操作</th>
      </tr>
    </thead>
    <tbody>
      <notempty name="list">
      <volist name="list" id="v">
      <tr class="hover">
        <td >{$v['name']}</td>
        <td class="w25pre align-center">{$v['time']}</td>
        <td class="w25pre align-center">{$v['size']}</td>
        <td class="align-center">
        <!-- <a href="javascript:alert('演示数据不提供下载');">下载</a>&nbsp;&nbsp;|&nbsp;&nbsp; -->
        <a href="{$Think.config.SiteUrl}/Backup/{$v['name']}">下载</a>&nbsp;&nbsp;|&nbsp;&nbsp;
       <!--  <a href="javascript:alert('演示数据不提供还原');">还原</a>&nbsp;&nbsp;|&nbsp;&nbsp; -->
        <a href="{:U('Database/recover',array('file'=>$v['name']))}">还原</a>&nbsp;&nbsp;|&nbsp;&nbsp;
        <a href='javascript:if(confirm("确定要删除？该操作不可逆,请谨慎操作!"))window.location ="{:U('Database/deletebak',array('file'=>$v['name']))}";'>删除</a></td>
      </tr>
      </volist>
      <else/>
      <tr class="no_data">
        <td colspan="15">暂无记录</td>
      </tr>
      </notempty>
    </tbody>
  </table>
</div>
<include file="Public/footer" />